package distill_micro_http

import (
	"fmt"
	infra "gitee.com/banyanhouse/distill-infra"
	"gitee.com/banyanhouse/distill-infra/apigrpc"
	"gitee.com/banyanhouse/distill-infra/base"
	"gitee.com/banyanhouse/distill-infra/hook"
	"gitee.com/banyanhouse/distill-infra/log"
	"gitee.com/banyanhouse/distill-infra/register"
	"gitee.com/banyanhouse/distill-infra/validator"
	_ "gitee.com/banyanhouse/distill-micro-grpc-hystrix/micro_prod_server/apis/grpcapi" // 将注册grpc服务包在这里进行引入，注册服务。
)

func init() {
	fmt.Println("start app...")
	infra.Register(&base.TomlPropsStarter{})
	infra.Register(&log.LoggerStarter{}) // 如果需要输出日志到文件中，则可以打开这里，去初始化文件日志
	infra.Register(&validator.ValidatorStarter{})
	infra.Register(&register.Etcd3Starter{})
	infra.Register(&apigrpc.GRpcApiStarter{}) // 启动distill-infra框架的GRpc启动器
	infra.Register(&hook.HookStarter{})
	fmt.Println("load end ...")
}
